package tech.aistar.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tech.aistar.entity.Phone;

import java.util.List;

/**
 * @Author: lya
 * @Description: 本类的作用描述:
 * @CreateDate: 2019/9/5
 * @Version: 1.0
 */
public interface PhoneMapper {
    //模糊查询
    List<Phone> findAll(@Param("name") String name, @Param("type_id") Integer type_id);

    //通过id删除
    void delById(Integer id);

    //添加
    void add(Phone phone);

    //修改
    void updateById(Phone phone);

    //按id查找
    @Select("select * from phone where id = #{value}")
    Phone findById(Integer id);
}
